package server;

import java.util.Iterator;

import dal.Pet_type;
import dal.User;

import infrastructure.exceptions.operations.OperationException;

/**
 * This is an admin interface to administrate the server
 * @author sashas
 *
 */
public interface IAdminInterface extends IServerSession{

	/**
	 * this operation adds a user <code> username </code> with password <code> password </code> to the server 
	 * @param username  - username of the user to add
	 * @param password  - password of the user to add
	 * @param isAdministrator - whether the user is administrator
	 * @throws OperationException in case operation failed (for example user already exists)
	 */
	public void addUser(String username,String password,Boolean isAdministrator) throws OperationException;
	
	/**
	 * This method removes the user <code> username <code> from the server. in case user does not 
	 * exists nothing happens  
	 * @param username - user to remove 
	 */
	public void removeUser(String username) throws OperationException;
	
	/**
	 * @return iterator of all users in the system
	 */
	public Iterator<User> getAllUsers();
	
	
	/**
	 * This method adds pet type to the types of the pets
	 * @param typeToAdd - type of the pet to add 
	 * @throws OperationException - in case that operation failed (for example type already exists)
	 */
	public void addPetType(Pet_type typeToAdd) throws OperationException;
	
	/**
	 * This method removes pet type to the types of the pets
	 * @param typeToAdd - type of the pet to add 	 
	 */
	public void removePetType(String typeToRemove);
}
